package br.com.iswe.gwt.ui.client.service;

import java.util.List;

import br.com.iswe.core.entidades.gwt.RemoteEntityObject;
import br.com.iswe.gwt.ui.client.QueryInfo;
import br.com.iswe.gwt.ui.client.RequestInfo;
import br.com.iswe.gwt.ui.client.exp.ISWERpcException;

import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("manterService")
public interface CrudService<ENTITY extends RemoteEntityObject> extends ManyToManyClientContract<ENTITY>  {

	ENTITY save(String controllerName, ENTITY entity, RequestInfo requestInfo) throws ISWERpcException;
	
	Boolean delete(String controllerName, ENTITY entity, RequestInfo requestInfo) throws ISWERpcException;
	
	List<ENTITY> getAllObjects(String controllerName, QueryInfo queryInfo) throws ISWERpcException;
	
	List<ENTITY> getObjects(String controllerName, ENTITY entity, QueryInfo queryInfo) throws ISWERpcException;
	
	ENTITY detail(String controllerName, ENTITY entity, QueryInfo queryInfo) throws ISWERpcException;
}
